package com.soso.gae.spider.service.impl;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManagerFactory;

public final class PMF {
	
	private volatile static PersistenceManagerFactory pmfInstance; 

	private PMF() {}

	public static PersistenceManagerFactory get() {
		return get("transactions");
	}
	public static PersistenceManagerFactory get(String transactionsOptional) {
		if(pmfInstance==null){
			synchronized(PMF.class){
				if(pmfInstance==null){
					pmfInstance = JDOHelper.getPersistenceManagerFactory(transactionsOptional);
				}
			}
		}
		return pmfInstance;
	}
}